
{% extends 'base_main.html' %}

{% block Meta %}
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
{% endblock %}

{% block js %}
    <script type="text/javascript" src="/static/kindeditor/kindeditor-all.js"></script>
    <script type="text/javascript" src="/static/kindeditor/lang/zh-CN.js"></script>
    <script type="text/javascript">
        KindEditor.ready(function(K) {
                window.editor = K.create('#editor_id');
        });
    </script>
{% endblock %}

{% block content %}

<section class="rt_wrap mCustomScrollbar">
{{ errors.goods_front_image}}
    <div class="rt_content">
        <div class="page_title">
            <h2 class="fl">商品详情</h2>
            <a class="fr top_rt_btn" href="{% url 'goods:goods_list' 1 %}">返回商品列表</a>
        </div>
        <form action="" method="post" enctype="multipart/form-data">
            {% csrf_token %}
            <section>
                <ul class="ulColumn2">
                    <li>
                        <span class="item_name" style="width:120px;">商品名称：</span>
                        <input type="text" name="name" value="{{ good.name }}" class="textbox textbox_295" placeholder="商品名称..."/>

                    </li>
                    <li>
                        <span class="item_name" style="width:120px;">商品货号：</span>
                        <input type="text" name="goods_sn" value="{{ good.goods_sn }}"  class="textbox" placeholder="商品货号..."/>

                    </li>
                    <li>
                        <span class="item_name" style="width:120px;">分类：</span>
                        <select class="select" name="category">

                                <option value="1" {% if good.category_id == 1 %}selected="selected"{% endif %}>新鲜水果</option>

                                <option value="2" {% if good.category_id == 2 %}selected="selected"{% endif %}>海鲜水产</option>

                                <option value="3" {% if good.category_id == 3 %}selected="selected"{% endif %}>猪牛羊肉</option>

                                <option value="4" {% if good.category_id == 4 %}selected="selected"{% endif %}>禽类蛋品</option>

                                <option value="5" {% if good.category_id == 5 %}selected="selected"{% endif %}>新鲜蔬菜</option>

                                <option value="6" {% if good.category_id == 6 %}selected="selected"{% endif %}>速冻食品</option>

                        </select>

                    </li>
                    <li>
                        <span class="item_name" style="width:120px;">商品库存：</span>
                        <input type="text" name="goods_nums" value="{{ good.goods_nums }}"  class="textbox textbox_295" placeholder="商品库存..."/>

                    </li>
                    <li>
                        <span class="item_name" style="width:120px;">市场价格：</span>
                        <input type="text" name="market_price" value="{{ good.market_price }}" class="textbox textbox_295" placeholder="市场价格..."/>

                    </li>
                    <li>
                        <span class="item_name" style="width:120px;">本店价格：</span>
                        <input type="text" name="shop_price" value="{{ good.shop_price }}" class="textbox textbox_295" placeholder="本店价格..."/>

                    </li>
                    <li>
                        <span class="item_name" style="width:120px;">商品简短描述：</span>
                        <input type="text" name="goods_brief" value="{{ good.goods_brief }}" class="textbox textbox_295" placeholder="商品简短描述..."/>

                    </li>
                    <li>
                        <span class="item_name" style="width:120px;">上传商品首图：</span>
                        <img src="/media/{{ good.goods_front_image }}">
                        <label class="uploadImg">
                             <input type="file" name="goods_front_image" />
                            <p>上传图片</p>
{#                             <span>上传图片</span>#}
                        </label>
                    </li>
                    <!--<li>-->
                        <!--<span class="item_name" style="width:120px;">产品详情：</span>-->

                        <!--<textarea id="editor_id" name="content" style="width:700px;height:300px;">-->
                            <!--&lt;strong&gt;HTML内容&lt;/strong&gt;-->
                        <!--</textarea>-->
                    <!--</li>-->
                    <li>
                        <span class="item_name" style="width:120px;"></span>
                        <input type="submit" class="link_btn"/>
                    </li>
                </ul>
            </section>
        </form>
    </div>

</section>
{% endblock %}